package com.lg.spring.ioc.scop.web;

import com.lg.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**

 http://localhost:8080/base/getUser

 AbstractRequestAttributesScope#get(String name, ObjectFactory<?> objectFactory)
    scopedObject

 */
@RestController
@RequestMapping("/base")
public class BaseController {
    @Value("${server.port}")
    private String serverPort;

    @Autowired
    private User user;


    @GetMapping("/getUser")
    public User getUser(){
        return user;
    }






}
